home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / tex / tex-3.1.lzh / TeX / inputs / standard / chart.tex (.txt) next >
LaTeX Document  |  1990-09-14  |  4KB  |  97 lines

  1. \def\shownewline{\newlinechar=`\^^j\message{^^j}}
  2. % Macros for The TeXbook
  3. \catcode`@=11 % borrow the private macros of PLAIN (with care)
  4. % Page layout
  5. \newdimen\pagewidth \newdimen\pageheight \newdimen\ruleht
  6. \hsize=29pc  \vsize=44pc  \maxdepth=2.2pt  \parindent=3pc
  7. \pagewidth=\hsize \pageheight=\vsize \ruleht=.5pt
  8. \abovedisplayskip=6pt plus 3pt minus 1pt
  9. \belowdisplayskip=6pt plus 3pt minus 1pt
  10. \abovedisplayshortskip=0pt plus 3pt
  11. \belowdisplayshortskip=4pt plus 3pt
  12. \newinsert\margin
  13. \dimen\margin=\maxdimen
  14. \def\bull{\vrule height .9ex width .8ex depth -.1ex } % square bullet
  15. \def\|{\leavevmode\hbox{\tt\char`\|}} % vertical line
  16. \def\dn{\leavevmode\hbox{\tt\char'14}} % downward arrow
  17. \def\up{\leavevmode\hbox{\tt\char'13}} % upward arrow
  18. \def\]{\leavevmode\hbox{\tt\char`\ }} % visible space
  19. \def\pt{\,{\rm pt}} % units of points, in math formulas
  20. \def\em{\,{\rm em}} % units of ems, in math formulas
  21. \def\<#1>{\leavevmode\hbox{$\langle$#1\/$\rangle$}} % syntactic quantity
  22. \def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
  23. \def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
  24. \def\cstok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt
  25.         \hbox{\vphantom{\tt/}\thinspace{\tt#1}\thinspace}}
  26.       \kern1pt\hrule}\vrule}\thinspace} % control sequence token
  27. {\obeyspaces\gdef {\ }}
  28. \def\parbreak{\hfil\break\indent\strut}
  29. \def\stretch{\nobreak\hskip0pt plus2pt\relax}
  30. % macros for non-centered displays
  31. \outer\def\begindisplay{\obeylines\startdisplay}
  32. {\obeylines\gdef\startdisplay#1
  33.   {\catcode`\^^M=5$$#1\halign\bgroup\indent##\hfil&&\qquad##\hfil\cr}}
  34. \outer\def\enddisplay{\crcr\egroup$$}
  35. % (the following \begin...\end-type macros do not appear in Appendix E)
  36. % macros for demonstrating math constructions
  37. \outer\def\beginmathdemo{$$\advance\baselineskip by2pt
  38.   \halign\bgroup\indent\hbox to 160pt{##\hfil}&$##$\hfil\cr\noalign{\vskip-2pt}}
  39. \outer\def\begindisplaymathdemo {$$\advance\baselineskip by15pt
  40.   \halign\bgroup\indent\hbox to 160pt{##\hfil}&$\displaystyle{##}$\hfil\cr
  41.   \noalign{\vskip-15pt}}
  42. \outer\def\beginlongmathdemo{$$\advance\baselineskip by2pt
  43.   \halign\bgroup\indent\hbox to 210pt{##\hfil}&$##$\hfil\cr\noalign{\vskip-2pt}}
  44. \outer\def\beginlongdisplaymathdemo {$$\advance\baselineskip by15pt
  45.   \halign\bgroup\indent\hbox to 210pt{##\hfil}&$\displaystyle{##}$\hfil\cr
  46.   \noalign{\vskip-15pt}}
  47. \outer\def\endmathdemo{\egroup$$}
  48. % macros for font tables
  49. \def\oddline#1{\cr
  50.   \noalign{\nointerlineskip}
  51.   \multispan{19}\hrulefill&
  52.   \setbox0=\hbox{\lower 2.3pt\hbox{\hex{#1x}}}\smash{\box0}\cr
  53.   \noalign{\nointerlineskip}}
  54. \def\evenline{\cr\noalign{\hrule}}
  55. \def\chartstrut{\lower4.5pt\vbox to14pt{}}
  56. \def\beginchart#1{{\rm Font table for #1}\vskip .25in
  57.  $$\postdisplaypenalty=-10000 \global\count@=0 
  58.   \font\cs=#1
  59.   \postdisplaypenalty=0
  60.   \cs
  61.   \halign to\hsize\bgroup
  62.     \chartstrut##\tabskip0pt plus10pt&
  63.     &\hfil##\hfil&\vrule##\cr
  64.     \lower6.5pt\null
  65.     &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
  66. \def\endchart{\raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
  67.   &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$}
  68. \def\:{\setbox0=\hbox{\char\count@}%
  69.   \ifdim\ht0>7.5pt\reposition
  70.   \else\ifdim\dp0>2.5pt\reposition\fi\fi
  71.   \box0\global\advance\count@ by1 }
  72. \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}
  73. \def\normalchart{%
  74.   &\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0
  75.   &\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  76.   &\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1
  77.   &\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  78.   &\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2
  79.   &\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  80.   &\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3
  81.   &\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  82.   &\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4
  83.   &\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  84.   &\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5
  85.   &\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  86.   &\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6
  87.   &\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  88.   &\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7
  89.   &\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline}
  90. %      Display a font table
  91. \shownewline
  92. \message{Name of font: }
  93. \read-1 to\fontname
  94. \beginchart{\fontname}
  95. \normalchart
  96. \endchart
  97.